<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>slot用法</title> 
    </head>
    <body>
        <div id = "app">
           <child-component>
               <p>分发的内容</p>
               <p>更多分发的内容</p>
           </child-component> 
        </div>
        <script src = "https://unpkg.com/vue/dist/vue.min.js"></script>
        <script>
            // 单个slot
            Vue.component('child-component',{
                tempalate:`\
                    <div>\
                        <slot>\
                            <p>如果父组件没有插入内容，我将作为默认出现</p>\
                        </slot>\
                    </div>`
            });
            var app = new Vue({
                el:'#app',

            })
        </script>
    </body>
</html>